import Vue from 'vue'
import VueRouter from 'vue-router'
import IndexWrap from '@/components/IndexWrap.vue';
import searchPage from '@/components/searchPage.vue';
import cateList from '@/components/cateList.vue';
import cate_p from '@/components/cate_p.vue';
import goods_detail from '@/components/goods_detail'
Vue.use(VueRouter);

const routes = [{
        path: '/',
        name: 'IndexWrap',
        component: IndexWrap
    },
    {
        path: '/searchPage',
        name: "searchPage",
        component: searchPage
    },
    {
        path: '/cateList',
        name: "cateList",
        component: cateList,
        children: [
            { path: '/cateList/p1', component: cate_p },
            { path: '/cateList/p2', component: cate_p },
            { path: '/cateList/p3', component: cate_p },
            { path: '/cateList/p4', component: cate_p },
            { path: '/cateList/p5', component: cate_p },
            { path: '/cateList/p6', component: cate_p },
            { path: '/cateList/p7', component: cate_p },
            { path: '/cateList/p8', component: cate_p },
            { path: '/cateList/p9', component: cate_p },
            { path: '/cateList/p10', component: cate_p },
            { path: '/cateList/p11', component: cate_p },
        ]
    },
    {
        path: '/goods_detail',
        name: "goods_detail",
        component: goods_detail
    },
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router